//cities.js
//获取应用实例
const app = getApp()
var util = require("../../utils/libs.js")
var api = require("../../utils/api.js")
Page({
  data: {
    cities: [],
  },
  detail:function(event){
    var id = event.currentTarget.dataset.id
    wx.navigateTo({
      url: '../article/article?id=' + id +'&param=rerecommend',
    })
  },
  editP:function(){
    wx.navigateTo({
      url: '../groups/groups',
    })
  },
  onLoad(options){
    let id = options.param;
    let that = this
    util.request(api.articleList+'?c_id='+id, { page: '1', limit: '10',}, "POST").then(function (res) {
      if (res.error_code === 0) {
        console.log(res);
        let arr = res.data.list
        
        that.setData({
          cities: arr
        })
      }
    })
    
  }
})
